package priv.cwr.springboot.demo.timer;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * User: R
 * Date: 2018/9/7
 * Time: 11:04
 * Created with IntelliJ IDEA.
 */
@Component
public class Timer {
    /**
     * 延迟initialDelay时间之后，以fixedDelay间隔执行任务
     */
    @Scheduled(fixedDelay = 1000, initialDelay = 1000)
    public void readdScore() {
        System.out.println("timer");
    }
}
